<template>
	<view>
		<view class="head">
			<image src="../../static/image/logo.png"></image>
			<view class="headTitle">
				<view>智助教育</view>
				<text>SHENZHEN ZHIZHU EDUCATION</text>
			</view>
		</view>
		<view class="titleImage">
			<image src="../../static/image/localTitle.png" mode="widthFix"></image>
		</view>
		<view class="bottom">
			<view class="number">{{localNumber}}</view>
			<view class="button" @click="Quick">本机号码一键登录</view>
			<navigator hover-class="false" class="tip" url="login-phone">其他号码登录</navigator>
			<view class="agreement" @tap="switchCheck">
				<radio color="#FF9900" :checked="isChecked" />
				<view class="agreement-tips">登录即同意<text @tap.stop="treaty">《智助教育服务条款》</text>、<text @tap.stop="treaty">《隐私协议》</text>和<text
					 @tap.stop="treaty">《中国{{editionName}}认证服务协议》</text>并使用本机号码登录</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				localNumber: '186****8907', //本机号码
				editionName: '移动', //本机通讯方式
				isChecked: false, //是否勾选协议
			}
		},
		methods: {
			// 一键登录
			Quick() {
				if (this.isChecked) {

				} else {
					uni.showToast({
						title: '请勾选协议',
						icon: 'none'
					})
				}
			},
			// 勾选协议&取消勾选协议
			switchCheck() {
				this.isChecked = !this.isChecked;
			},
			// 跳转协议
			treaty() {
				this.isChecked = false;
				uni.navigateTo({
					url: 'clause'
				})
			}
		}
	}
</script>

<style>
	.head {
		padding: 48upx 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.head image {
		width: 164upx;
		height: 164upx;
		margin-right: 14upx;
	}

	.headTitle view {
		color: #4792CC;
		font-size: 70upx;
		line-height: 1;
		font-family: Source Han Sans CN;
	}

	.headTitle text {
		color: #262727;
		font-size: 18upx;
		font-family: Source Han Sans CN;
	}

	.titleImage image {
		width: 50%;
		margin: 0 25%;
	}

	.bottom {
		position: absolute;
		bottom: 130upx;
	}

	.number {
		color: #333333;
		line-height: 1;
		font-size: 32upx;
		text-align: center;
		margin-bottom: 72upx;
	}

	.button {
		color: #FFFFFF;
		height: 98upx;
		line-height: 98upx;
		margin: 0 24upx;
		width: calc(100% - 48upx);
		font-size: 36upx;
		text-align: center;
		background: #FF9900;
		border-radius: 50upx;
	}

	.tip {
		color: #666666;
		font-size: 24upx;
		margin: 54upx 100upx;
		text-align: center;
	}

	.agreement {
		margin: 0 80upx;
		display: flex;
		align-items: flex-start;
		justify-content: center;
	}

	.agreement-tips {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
	}

	.agreement-tips text {
		color: #FF9900;
	}

	radio {
		transform: scale(0.7);
	}
	
	uni-radio .uni-radio-input:hover{
		border-color: #FF9900 !important;
	}
</style>
